package com.jt.demo5;

import org.springframework.context.annotation.*;

@Configuration
@ComponentScan("com.jt.demo5")
public class SpringConfig {
    @Bean
    //@Lazy //开启懒加载
    //@Scope("singleton")   //默认单例
    @Scope("prototype") //多例对象
    public Dog dog() {
        return new Dog();
    }
}
